package com.acme.bankapp;

import com.acme.bankapp.domain.bank.Account;
import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.CheckingAccount;
import com.acme.bankapp.domain.bank.Client;
import com.acme.bankapp.domain.bank.Gender;
import com.acme.bankapp.domain.bank.SavingAccount;
import com.acme.bankapp.exceptions.ClientExistsException;
import com.acme.bankapp.service.bank.BankService;

public class BankApplication {
    public static void main(String[] args) {
   	
    	Client[] clients = new Client[] {
    			new Client("Ivanov I.I.", Gender.MALE, new SavingAccount(999999.99)),
    			new Client("Petrov P.P.", Gender.MALE, new SavingAccount(99999.99)),
    			new Client("Sidorov S.S.", Gender.MALE, new SavingAccount(9999.99)),
    			new Client("Frolova F.F.", Gender.FEMALE, new SavingAccount(999.99)),
    			new Client("Vasiljeva V.V.", Gender.FEMALE, new CheckingAccount(999999.99, 9999999.99)),
    			new Client("Alekseeva A.A.", Gender.FEMALE, new CheckingAccount(10000.00, 10000.00))
    			};    	

    	Bank bank = new Bank(clients);
    	BankService bankService = new BankService();
    	
    	Client newcl = new Client("Newvanov I.I.", Gender.MALE, new SavingAccount(999999.99));
   		BankService.addClient(bank, newcl);
    	
    	Client newcl1 = new Client("NewAnothervanov I.I.", Gender.MALE, new SavingAccount(999999.99));
   		BankService.addClient(bank, newcl1);
    	
   		Client newcl2 = new Client("NewAnothervanov I.I.", Gender.MALE, new SavingAccount(999999.99));
    	BankService.addClient(bank, newcl2);
    	
    	bankService.modifyBank(bank);

    	BankService.printBalance(bank);
    }
}	
